﻿using System;
using System.Collections.Generic;
using BotonJXC.Entity;
using AssumeModeDAO = BotonJXC.DAO.AssumeModeDAO;
using BotonJXC.Util;
using NHibernate.Criterion;

namespace BotonJXC.BLL
{
    public class AssumeModeBLL : BaseBLL<AssumeModeDAO, AssumeMode, int>
    {
        public AssumeModeBLL()
        {
        }

        public PageModel<AssumeMode> Find(string assumeModeName, int start, int count)
        {
            List<ICriterion> criterions = new List<ICriterion>();
            if (!string.IsNullOrEmpty(assumeModeName))
            {
                criterions.Add(Restrictions.Like("AssumeModeName", assumeModeName, MatchMode.Anywhere));
            }
            return Dao.FindByPage(criterions.ToArray(), null, start, count);
        }
    }
}